home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / sys / stat.h < prev    next >
C/C++ Source or Header  |  1991-06-03  |  2KB  |  85 lines

  1. /*
  2.  * Copyright (c) 1982, 1986 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)stat.h    7.1 (Berkeley) 6/4/86
  7.  * $Header: /sprite/src/lib/include/sys/RCS/stat.h,v 1.9 91/06/03 17:26:29 kupfer Exp $
  8.  */
  9.  
  10. #ifndef _STAT
  11. #define _STAT
  12.  
  13. #include <cfuncproto.h>
  14.  
  15. struct    stat
  16. {
  17.     dev_t    st_dev;
  18.     ino_t    st_ino;
  19.     unsigned short st_mode;
  20.     short    st_nlink;
  21.     uid_t    st_uid;
  22.     gid_t    st_gid;
  23.     dev_t    st_rdev;
  24.     off_t    st_size;
  25.     time_t    st_atime;
  26.     int    st_spare1;
  27.     time_t    st_mtime;
  28.     int    st_spare2;
  29.     time_t    st_ctime;
  30.     int    st_spare3;
  31.     long    st_blksize;
  32.     long    st_blocks;
  33.     long    st_serverID;
  34.     long    st_version;
  35.     long    st_userType;
  36.     long    st_devServerID;
  37. };
  38.  
  39. #define    S_IFMT    0170000        /* type of file */
  40. #define        S_IFDIR    0040000    /* directory */
  41. #define        S_IFCHR    0020000    /* character special */
  42. #define        S_IFBLK    0060000    /* block special */
  43. #define        S_IFREG    0100000    /* regular */
  44. #define        S_IFLNK    0120000    /* symbolic link */
  45. #define        S_IFSOCK 0140000/* socket */
  46. #define        S_IFIFO    0010000    /* fifo */
  47. /* Extra Sprite types */
  48. #define        S_IFPDEV 0150000 /* pseudo-device */
  49. #define        S_IFRLNK 0160000 /* remote link */
  50. #define    S_ISUID    0004000        /* set user id on execution */
  51. #define    S_ISGID    0002000        /* set group id on execution */
  52. #define    S_ISVTX    0001000        /* save swapped text even after use */
  53. #define    S_IREAD    0000400        /* read permission, owner */
  54. #define    S_IWRITE 0000200    /* write permission, owner */
  55. #define    S_IEXEC    0000100        /* execute/search permission, owner */
  56. /*
  57.  * User-defined file types.  A number of types are standardized, but others
  58.  * may be defined by the user.
  59.  *
  60.  *     S_TYPE_UNDEFINED    - no type set
  61.  *     S_TYPE_TMP          - temporary file
  62.  *     S_TYPE_SWAP         - swap file
  63.  *     S_TYPE_OBJECT       - ".o" file
  64.  *     S_TYPE_BINARY       - executable
  65.  *     S_TYPE_OTHER       - file that doesn't correspond to any
  66.  *                  specific type.  This is distinct
  67.  *                  from undefined, which says the type
  68.  *                  is uninitialized and may be inferred
  69.  *                  by parent directory or file name.
  70.  */
  71. #define S_TYPE_UNDEFINED 0
  72. #define S_TYPE_TMP 1
  73. #define S_TYPE_SWAP 2
  74. #define S_TYPE_OBJECT 3
  75. #define S_TYPE_BINARY 4
  76. #define S_TYPE_OTHER 5
  77.  
  78. extern int fstat _ARGS_((int fd, struct stat *buf));
  79. extern int lstat _ARGS_((char *path, struct stat *buf));
  80. extern int stat _ARGS_((char *path, struct stat *buf));
  81.  
  82. extern int mkdir _ARGS_((char *path, int mode));
  83.  
  84. #endif /* _STAT */
  85.